import 'package:flutter/cupertino.dart';
import 'package:flutterlib/common/config/config.dart';
import 'package:json_annotation/json_annotation.dart';

part 'page_query.g.dart';

@JsonSerializable()
class PageQuery {
  factory PageQuery.fromJson(Map<String, dynamic> json) =>
      _$PageQueryFromJson(json);

  Map<String, dynamic> toJson() => _$PageQueryToJson(this);
  int pageNum = 1;
  int pageSize = Config.PAGE_SIZE;
  int limitStart;
  int limitEnd;
  String orderfield;
  String ordertype;


  PageQuery();

  PageQuery.builder({@required this.pageNum, this.pageSize:Config.PAGE_SIZE, this.limitStart
    ,this.limitEnd, this.orderfield, this.ordertype});

  PageQuery.fromPage({@required this.pageNum, this.pageSize:Config.PAGE_SIZE});

}
